package com.javathread.th5;

import java.util.concurrent.ConcurrentHashMap;

public class TestMap18 {

	public static void main(String[] args) {
		ConcurrentHashMap<String, String> map = new ConcurrentHashMap<String, String>();
		map.put("lcc", "lcc");
		map.get("xxxx");
		
		int c = 125;
		int n = c - 1;
		n |= n >>> 1;
		n |= n >>> 2;
		n |= n >>> 4;
		n |= n >>> 8;
		n |= n >>> 16;
		n = n + 1;
		System.out.println("n=" + n);
		
		int h = 22334534;
		int spreadHashCode = (h ^ (h >>> 16)) & 0x7fffffff;
		System.out.println("h=" + h + " = " + Integer.toBinaryString(h));
		System.out.println("s=" + spreadHashCode + " = " + Integer.toBinaryString(spreadHashCode));
		
		int tt = 1 << 30;
		System.out.println("tt=" + tt + " = " + Integer.toBinaryString(tt)+"  长度:" + Integer.toBinaryString(tt).length());
	}

}
